/*
 * Created on Feb 6, 2004
 */
package org.vectrics.recruiter.struts.tag;

import org.vectrics.employee.Employee;
import org.vectrics.hibernate.ThreadProperties;
import org.vectrics.recruiter.RecruitServiceLocator;
import org.vectrics.user.Person;

public class RecruitUserSummaryTag extends RecruitUserSummaryTagAbstract {
	public static final long serialVersionUID = 6570034603455L;
	
	private String showResumeCount = "false";

	@Override
    protected boolean personCanOnlyViewSelf() {
    	return(false);
    }
	
	@Override
    protected void afterUserTable(Person person) {
		String companyId = ThreadProperties.getDomain().getPrimaryCompany().getId().toString();
		Employee employee =  RecruitServiceLocator.getCompanyService().findEmployee(new Long(getPersonId()), new Long(companyId));
		if ((employee == null) ||  (this.getShowResumeCount().trim().equalsIgnoreCase("true"))){
			// Muestro los campos del candidato
			showResumeCount(person);
	        showCandidateDetails(person);
		}
    }

	@Override
    public boolean showCompany() {
    	return(false);
    }

	@Override
	protected boolean showUserPrivileges() {
    	return(false);
    }
    
	public String getShowResumeCount() {
		return showResumeCount;
	}
	public void setShowResumeCount(String showResumeCount) {
		this.showResumeCount = showResumeCount;
	}
	
	
}
